const {
  override,
  addWebpackAlias,
  overrideDevServer,
} = require("customize-cra");

const path = require("path");

module.exports = {
  webpack: override(
    addWebpackAlias({
      "@": path.resolve(__dirname, "src"),
    })
  ),
  devserver: overrideDevServer((config) => {
    return {
      ...config,
      proxy: {
        "/api": {
          target: "htttp://localhost:3333",
        },
      },
    };
  }),
};
